package edu.uow.devdocs

class IssueService {
	def currentUserService

    def Issue createDefaultIssue(String description, Project project, IssueType issueType) {
		def issue = new Issue()
		issue.description = description
		issue.priority = 3
		issue.dateCreated = new Date()
		issue.status = IssueStatus.initialStatus.get()
		issue.project = project
		issue.issueType = issueType
		issue.person = currentUserService.getCurrentUser()
		issue.save(flush:true)
		return issue
	}

	
}
